package fortunetelling.fortunetelling.bean;

import java.io.Serializable;
import java.util.Objects;

/**
 * @ClassName: Fortune
 * @Date: 2020/10/5 0005 17:54
 * @Description:
 */
public class Fortune implements Serializable {

    private static final long serialVersionUID = 5588851635542664436L;
    private String name;
    private String hint;
    private String poem;

    public Fortune() {
    }

    public Fortune(String name, String hint, String poem) {
        this.name = name;
        this.hint = hint;
        this.poem = poem;
    }

    @Override
    public String toString() {
        return "Fortune{" +
                "name='" + name + '\'' +
                ", hint='" + hint + '\'' +
                ", poem='" + poem + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Fortune fortune = (Fortune) o;
        return Objects.equals(name, fortune.name) &&
                Objects.equals(hint, fortune.hint) &&
                Objects.equals(poem, fortune.poem);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, hint, poem);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getHint() {
        return hint;
    }

    public void setHint(String hint) {
        this.hint = hint;
    }

    public String getPoem() {
        return poem;
    }

    public void setPoem(String poem) {
        this.poem = poem;
    }
}
